FORMS += configwindow.ui \
    lyricsdownloadwindow.ui

RESOURCES += res.qrc

SOURCES += main.cpp \
    lyricswindow.cpp \
    configmanager.cpp \
    lyricspanel.cpp \
    lyricslayeredpanel.cpp \
    lyricsdata.cpp \
    player.cpp \
    lyricsmanager.cpp \
    lyricsprovider.cpp \
    lyricsjob.cpp \
    lyricslocalprovider.cpp \
    configwindow.cpp \
    lyricsdownloadwindow.cpp \
    lyricshorizontalpainter.cpp \
    lyricsverticalpainter.cpp \
    lyricsnormalpainter.cpp \
    lyricsbaiduprovider.cpp \
    lyricsttprovider.cpp \
    lyricspainter.cpp

HEADERS += basictype.h \
    lyricswindow.h \
    configmanager.h \
    lyricspanel.h \
    lyricsnormalpanel.h \
    lyricslayeredpanel.h \
    lyricsdata.h \
    player.h \
    lyricsmanager.h \
    lyricsprovider.h \
    lyricsjob.h \
    lyricslocalprovider.h \
    configwindow.h \
    lyricsdownloadwindow.h \
    lyricshorizontalpainter.h \
    lyricsverticalpainter.h \
    lyricsnormalpainter.h \
    lyricsbaiduprovider.h \
    lyricsttprovider.h \
    lyricspainter.h

TRANSLATIONS += qlyrics_en.ts \
    qlyrics_zh_CN.ts

TEMPLATE = app

CONFIG += thread \
    opengl \
    debug

QT += network \
    gui \
    xml

#QMAKE_CXXFLAGS += -Wall

opengl {
    QT += opengl
    DEFINES += OPENGL_WIDGET
    message(OpenGL support is enabled)
} else {
    message(OpenGL support is disabled)
}

QT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
QT_INSTALL_DATA = $$[QT_INSTALL_DATA]
win32 {
    DEFINES += 'QT_INSTALL_DATA=\"\\\"$$replace(QT_INSTALL_DATA,\\\\,\\\\)\\\"\"'
    DEFINES += 'PREFIX=\"\\\"$$replace(QT_INSTALL_PREFIX,\\\\,\\\\)\\\"\"'
} else {
    DEFINES += '\'QT_INSTALL_DATA=\"$$[QT_INSTALL_DATA]\"\''
    DEFINES += '\'PREFIX=\"$$[QT_INSTALL_PREFIX]\"\''
}

CONFIG (debug, debug|release) {
    TARGET = ../build/bin/qlyrics.dbg
    OBJECTS_DIR = ../build/obj.dbg/
    CONFIG += warn_on
} else {
    TARGET = ../build/bin/qlyrics
    OBJECTS_DIR = ../build/obj/
    CONFIG += warn_off
}

UI_DIR = ../build/ui/

MOC_DIR = ../build/moc/

RCC_DIR = ../build/res/

trans.files = ../build/translations/*
trans.path = $$[QT_INSTALL_PREFIX]/share/qlyrics/translations/

target.path = $$[QT_INSTALL_PREFIX]/bin/

INSTALLS += trans target

